#！/bin/bash
VERSION=v1.0.0

cd ../

mvn clean package -DskipTests
echo "==========================="
echo "maven package success"
echo "==========================="

docker login --username=suanpan-dev@xuelangyun -p Xuelang#2024! registry.xuelangyun.com

docker build \
    --build-arg VERSION=$VERSION \
    -t sh-platform-dev-registry.cn-shanghai.cr.aliyuncs.com/shanghang/engine/eng-3d-controller-backend:$VERSION \
    -f docker/Dockerfile .
echo "==========================="
echo "docker build success"
echo "==========================="

docker push sh-platform-dev-registry.cn-shanghai.cr.aliyuncs.com/shanghang/engine/eng-3d-controller-backend:$VERSION
echo "==========================="
echo "docker push success"
echo "==========================="